
import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'

//ElementPlus组件库全局注册
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// 引入ElementPlus图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
//引入Echarts组件库
import * as echarts from 'echarts'
import VChart from 'vue-echarts';
const app = createApp(App)

app.config.globalProperties.$echarts = echarts
app.component('v-chart', VChart); // 全局注册 VChart 组件
app.use(createPinia())
app.use(router)
app.use(ElementPlus)

// 全局注册所有图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.mount('#app')
